package org.dlust;

import org.dlust.config.MainConfig;
import org.dlust.entity.Calculator;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App
{
    public static void main( String[] args )
    {
        AnnotationConfigApplicationContext app = new AnnotationConfigApplicationContext(MainConfig.class);

        for (String bean : app.getBeanDefinitionNames()) {
            System.out.println(bean);
        }

        Calculator calculator = app.getBean(Calculator.class);
        int result = calculator.div(4,2);
        System.out.println(result);

        app.close();
    }
}
